/**
 * @file setting_volume.h
 *
 */
#ifndef SETTING_VOLUME_H
#define SETTING_VOLUME_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#if USE_LV_WATCH_SETTING_VOLUME != 0

/*********************
 *      DEFINES
 *********************/
typedef struct {
    uint8_t ringvolume;                                     // ring volume level
} setting_ringvolume_t;
/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Create a setting volume application
 */
lv_obj_t * setting_volume_create(lv_obj_t * activity_obj);
lv_obj_t * setting_volume_button_content_create(lv_obj_t * par);
lv_obj_t * setting_volume_bar_content_create(lv_obj_t * par);
void setting_volume_create_btn_action(lv_obj_t * btn, lv_event_t event);
void setting_volume_decrease_btn_action(lv_obj_t * btn, lv_event_t event);
void setting_volume_increase_btn_action(lv_obj_t * btn, lv_event_t event);
void setting_volume_prepare_destory(lv_obj_t * activity_obj);
extern void setting_volume_init(nv_watch_settings_t *nvsettings);
extern HAL_SPEAKER_GAIN query_current_volume(void);
extern void setting_set_ring_volume(uint8_t volume, bool writenvm, bool play);

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_SETTING_VOLUME*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*SETTING_VOLUME_H*/
